/*
 * @Description:
 * @Author: wangqi
 * @Date: 2024-08-29 09:27:46
 * @LastEditTime: 2024-08-29 10:00:43
 * @LastEditAuthor: wangqi
 */
import { Controller, Get, Post } from '@nestjs/common';
import { AppService } from './app.service';

type UserList = {
  id: string;
  name: string;
  age: string;
  sex: string;
};

@Controller()
export class AppController {
  constructor(private readonly appService: AppService) {}

  @Get('/users')
  getUserList(): UserList[] {
    return this.appService.getUserList();
  }

  @Post('/userInfo')
  getUserInfo(): UserList {
    return this.appService.getUserList()[1];
  }
}
